<? if($this->pageArray['pageNumber']>0):?>
<form name="productIndexForm" id="productIndexForm" action="admins<?=CHOSING_DE?>product<?=CHOSING_DE?>del" method="post">
<table class="list" border="1" cellpadding="0" cellspacing="0" bordercolor="#b9b9b9" style="border-collapse:collapse">
    <tr class="topic" style="background: #e5dede;">
    	<td><b>NO.</b></td>
    	<td><b>Create Time<br />Pay Time</b></td>
    	<td><b>Total</b></td>
    	<!-- <td><b>Dead Line</b></td> -->
    	<td><b>Status</b></td>
    	<td><b>Edit</b></td>
    </tr>
    <?php foreach($this->orderArray as $value):?>		
    <tr>
    	<td><b>G<?=$value['orderid']?></b></td>
    	<td>
	    	<?=date('Y-m-d H:i:s',$value['add_time'])?><br />
	    	<?if($value['pay_time']!=0):?>
				<?=date('Y-m-d H:i:s',$value['pay_time'])?>
			<?else:?>
				Payment Pending
			<?endif;?>
    	</td>
    	<td>$<?=round($value['money']*$value['discount'],2)?></td>
    	<!-- <td>
    		<?=date('Y-m-d H:i:s',$value['add_time']+$value['delivery_days']*24*3600)?>
			<br />
			<?if($value['ship_time']!=0):?>
				<?=date('Y-m-d H:i:s',$value['ship_time'])?>
			<?else:?>
				In Delivery
			<?endif;?>
    	</td> -->
    	<td><?=$value['en_flname']?></td>
    	<td>
    		<?if($value['flid']=='1'):?>				
				<span style="width:58px; height:23px; background: url(/images/pay.jpg) #CCCCCC; display: block; margin: 0 auto; cursor: pointer"><a href="/product-addcontact2?id=<?php echo $value['orderid'];?>" target="_blank" style="color: #ffffff; width: 43px; height: 21px;padding-right: 15px; padding-top: 2px;display: block;">Pay</a></span>
				<span style="width:43px; height:21px; display: block; margin: 0 auto;"><a onclick="return shouldCancel();" href="adminb-order-docancel?orderid=<?=$value['orderid']?>">Cancel</a></span>
			<?else:?>
				<a href="adminb-order-more?orderid=<?=$value['orderid']?>">More</a> 
			<?endif;?>
    	</td>
    </tr>
    <?php endforeach;?>
</table>
</form>
<table class="formt" width="500">
    <tr>
    	<td align="center"><span>All <?=$this->pageArray['pageNumber']?> Page(s)</span> <?=$this->pageString?></td>
    </tr>
</table>
<?php else:?>
	<?=$this->getMsg('No Order!');?>
<?php endif;?>

<script>
function shouldCancel(){
	if(confirm("Are you sure to cancel this order?")){
		return true;
	}else{
		return false;
	}
}
</script>